<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
	<link rel="stylesheet" type="text/css" href="../css/style.css">
</head>
<body>


	<%-include("header") %>
	<div class="box">
		
		<ul class="news">
			<li>
				<div class="uinfo">
					<a href="#">
						<img src="http://127.0.0.1:8080/<%=result.user.imgpath %>">
						<div><%=result.user.username %></div>
					</a>
				</div>
				<div class="cbox">
					<div class="content">
						<a href="#">
							<p><%=result.title %></p>
							<p>
								<%=result.context %>
							</p>
						</a>
					</div>
					<div>
						<span>
							<%=result.ctime %>
						</span>
						<span>浏览(<%=result.browse%>)</span>
						<span>评论(<%=result.comment%>)</span>
					</div>
				</div>
			</li>

			<li>
				<div class="uinfo"></div>
				<!-- 判断用户登录与否 -->
				<% if(user){ %>
				<div class="post">
					<form action="/msg/<%-result._id %>" method="post">
						<div>
							<textarea class="commont_area" name="context"></textarea>
						</div>
						<div>
							<input type="submit" value="发表评论">
						</div>
						
					</form>
				</div>
				<% } %>
			</li>


			<li>
				<div class="uinfo">
					

				</div>

				<div class="commentlist">
					<ul>
					<% for (let i = 0; i < com.length; i++) { %>
						<li>
							<div>
								<img src="http://127.0.0.1:8080/<%=com[i].user.imgpath  %>">
								<div class="comment">
									<div>
										<span class="username"><%=com[i].user.username  %>：</span>
										<span><%=com[i].context  %></span>
									</div>

									<div class="other">
										<span><%=com[i].ctime  %></span>
										<span>点赞(99)</span>
									</div>
								</div>
							</div>
						</li>

					<% 	} %>	
					</ul>
				</div>
				
			</li>
		</ul>




	</div>
</body>
</html>